import type { FieldRule, TableColumnData, TableData, ValidatedError } from '@arco-design/web-vue'

/** arco from 组件校验规则 */
export type FormRule<T extends object> = Partial<Record<keyof T, FieldRule | FieldRule[]>>

/** arco form 组件校验结果 */
export type FormValidateResult = {
  values: Record<string, any>
  errors?: Record<string, ValidatedError>
}

/** arco from 表单字段插槽类型 */
export type TableSlotCell<T> = {
  column: TableColumnData
  rowIndex: number
  record: T & TableData
}

export type ListItem<T> = {
  index: number
  item: T
}
